<div class="container">
    <div class="panel panel-default">
        <div class="panel-body">
            <span class="glyphicon glyphicon-user">&nbsp;管理员管理&nbsp;</span>
            <span class="glyphicon glyphicon-chevron-right">&nbsp;查看角色信息&nbsp;</span>
            <span class="glyphicon glyphicon-chevron-right">&nbsp;修改角色菜单&nbsp;</span>
            <a href="javascript:window.history.go(-1);">返回</a>
        </div>
    </div>

    <div>
        <form role="form" class="form-horizontal" ng-init="getMenus()">
            <div class="form-group">
                <label for="username" class="control-label col-sm-3">角色名称：</label>
                <div class="col-sm-3">
                    <input type="text" class="form-control" id="username" placeholder="角色名称" ng-model="name" readonly/>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-sm-3">角色权限：</label>
            </div>
            <div class="form-group" ng-repeat="item in aAllMenus| filter: {'parentId': null}">
                <label class="control-label col-sm-3">{{item.name}}</label>
                <div class="col-sm-8 checkbox">
                    <div class="col-sm-3" ng-repeat="subItem in aAllMenus| filter: {'parentId': item.id}">
                        <label>
                            <input type="checkbox" data-menu-id="{{subItem.id}}"
                                   ng-checked="isDefaultSelected(subItem.id)" ng-click="toggleCheck(subItem.id)"/>
                            {{subItem.name}}
                        </label>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-3 col-sm-9">
                    <button type="button" class="btn btn-primary" ng-click="updateRoleMenu()"
                            ng-disabled="!aMyMenusId.length">保存
                    </button>
                </div>
            </div>
        </form>
    </div>
</div>